From: Joey Hess Date: Mon, 26 Sep 2022 19:11:38 +0000 (-0400) Subject: fix wormhole --appid option position X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~69^2~36 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=17129fed66921a8828a51270b6e4ed3a51581ac3;p=git-annex.git fix wormhole --appid option position p2p: Pass wormhole the --appid option before the receive/send command, as it does not accept that option after the command I'm left wondering, did I get this wrong from the beginning, or did wormhole change its option parser? I'm reminded of the change in 0.8.2 where it silently changed what FD the pairing code was output to. But, looking at the wormhole source, it was at least putting --appid before send in its test suite from the introduction of the option. So I think probably this has always been broken. On 2021-12-31 the --appid option was enabled, and it took until now for someone to try git-annex p2p --pair and notice that flag day broke it.. Sponsored-by: Svenne Krap on Patreon --- diff --git a/CHANGELOG b/CHANGELOG index 7f2a6773f3..9a202ccaf6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -41,6 +41,8 @@ git-annex (10.20220823) UNRELEASED; urgency=medium * enable-tor: Fix breakage caused by git's fix for CVE-2022-24765. * Let GIT_DIR and --git-dir override git's protection against operating in a repository owned by another user. + * p2p: Pass wormhole the --appid option before the receive/send command, + as it does not accept that option after the command -- Joey Hess Mon, 29 Aug 2022 15:03:04 -0400 diff --git a/Utility/MagicWormhole.hs b/Utility/MagicWormhole.hs index cc189b6252..a4128d1d5c 100644 --- a/Utility/MagicWormhole.hs +++ b/Utility/MagicWormhole.hs @@ -119,7 +119,7 @@ sendFile f (CodeObserver observer) ps = do (findcode ph herr) return (inout || inerr) where - p = wormHoleProcess (Param "send" : ps ++ [File f]) + p = wormHoleProcess (ps ++ [Param "send", File f]) findcode ph h = findcode' =<< getwords ph h [] findcode' [] = return False findcode' (w:ws) = case mkCode w of @@ -140,12 +140,12 @@ receiveFile f (CodeProducer producer) ps = runWormHoleProcess p $ \hin _hout _he hFlush hin return True where - p = wormHoleProcess $ + p = wormHoleProcess $ ps ++ [ Param "receive" , Param "--accept-file" , Param "--output-file" , File f - ] ++ ps + ] wormHoleProcess :: WormHoleParams -> CreateProcess wormHoleProcess = proc "wormhole" . toCommand diff --git a/doc/bugs/git_annex_connecting_over_tor_does_not_work.mdwn b/doc/bugs/git_annex_connecting_over_tor_does_not_work.mdwn index bdf2701c24..586650e5de 100644 --- a/doc/bugs/git_annex_connecting_over_tor_does_not_work.mdwn +++ b/doc/bugs/git_annex_connecting_over_tor_does_not_work.mdwn @@ -78,3 +78,5 @@ p2p: 1 failed ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) git annex has been awesome so far in helping track and backup my data, also for allowing me to output podcasts/audiobooks to a small mp3 player, as well as ebooks and pdfs to a kindle paper ewhite, which has made using my ereader no longer an inconvinient endeavour + +> [[fixed|done]] --[[Joey]]